from django.contrib.auth.views import LoginView
from braces.views import AnonymousRequiredMixin

from .forms import CustomAuthenticationForm

# 如果用户已经登录重定向到settings.LOGIN_REDIRECT_URL页面
# 默认为/accounts/profile/
class CustomLoginView(AnonymousRequiredMixin, LoginView):
    form_class = CustomAuthenticationForm

